#include "widget.h"
#include "ui_widget.h"
#include "QDebug"
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_no_clicked()
{
    //将该空间缩小，并随机修改位置
    int x = rand() % 500;
    int y = rand() % 500;
    QRect rect = ui->pushButton_no->geometry();
    qDebug() << rect;
    ui->pushButton_no->setGeometry(x,y,rect.width(), rect.height());
    //将pushButton_yes 放大
    rect = ui->pushButton_yes->geometry();
    ui->pushButton_yes->setGeometry(rect.x(),rect.y(),rect.width() + 10,rect.height() + 10);
}

void Widget::on_pushButton_yes_clicked()
{
    ui->label->setText("太好了，嘿嘿嘿");
}
